<!DOCTYPE html>
<html>
	<head>
		<title>登录</title>
		<meta charset="utf-8" />
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE10; IE=EmulateIE11">
		<script type="text/javascript" src="$!path/resources/jquery/jquery-1.8.3.js"></script>
		<script type="text/javascript" src="$!path/resources/jquery/jquery-form-fieldname.js"></script>
		<link rel="stylesheet" href="$!path/resources/css/login.css">
	<script>
			$(function() {
				var fi = $("form input");
				var rab = $(".rain,.border");
				fi.bind("focus", function() {
					rab.removeClass("unfocus");
				});
				fi.bind("blur", function() {
					rab.addClass("unfocus");
				});
				fi.first().focus();
				var count = 300;
				for(var i = 0;i<count;i++){
					var span = $("<span style='display:block;position:absolute;width:2px;height:2px;background-color:white;z-index:0;'></span>");
					var pos = randomPosition(document.documentElement.clientWidth-20,document.documentElement.clientHeight-20);
					span.css({left:pos.x,top:pos.y});
					var size = Math.round(Math.random()*4)+"px";
					span.css({width:size,height:size})
					span.appendTo(document.body);
				}
				
				#if($!message)
					alert("$!message");
				#end
			});
			function randomPosition(mx,my){
				x = Math.round(Math.random()*mx);
				y = Math.round(Math.random()*my);
				var x1 = $(".rain").offset().left,y1 = $(".rain").offset().top,x2 = $(".rain").width() + x1 +10,y2 = $(".rain").height() + y1 +10;
				if(x >= x1 && x <= x2 && y >= y1 && y <= y2){
					return randomPosition(mx,my);
				}
				return {x:x,y:y};
			}
		</script>
	</head>
	<body id="home">
		<div class="rain">
			<div class="border">
				<form action="$!path/login" method="post" autocomplete="false">
					<label>账号</label>
					<input field="name" type="text" placeholder="用户名/手机/邮箱" />
					<input name="name" type="text" style="display: none;" class="remove-input"/>
					<label>密码</label>
					<input name="password" type="password" style="display: none;" class="remove-input"/>
					<input field="password" type="password" placeholder="密码" />
					<input type="submit" value="登录" />
					<a href="register">
						<input type="button" value="注册"/>
					</a>
				</form>
			</div>
		</div>
	</body>
</html>
